![]() |
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
![]() |
To access the contents, click the chapter and section titles.
Oracle Performance Tuning and Optimization
Characteristics of the Oracle Backup ProcessBefore looking at the specifics of the hot and cold backups, you should review a little of the operation of Oracle and how the backup process fits into this operation. To characterize an Oracle backup, you should first understand how it operates in terms of both a hot backup and a cold backup. Because the cold backup is much simpler, well look at it first. Cold (Offline) BackupIn a cold backup, the system is in a quiescent stage, the database is shut down, and no Oracle processes are running. The cold Oracle backup is sometimes referred to as an offline backup. To perform a backup, each of the data files is backed up as an OS file or raw partition. An offline backup can be accomplished using an OS function or through a third-party utility you may have purchased. It is important that you back up not only the data files but the redo log and control files as well. The characteristic of this kind of backup is that each data file is read sequentially. Unless some other OS function accesses the disks, you get purely sequential I/O. To take advantage of the sequential nature of the cold database backup, you should isolate the sequential I/Os by avoiding any other I/Os to that disk volume. Because several tablespaces may use the same volume, you should serialize the backup of those data files. Hot (Online) BackupWhen performing a hot Oracle backup, also referred to as an online backup, the tablespace to be backed up is taken offline using the Oracle command ALTER TABLESPACE BEGIN BACKUP. The tablespace being backed up can still be modified, but all changes are kept in the SGA and are not written to the data files until the backup is complete. Once the tablespace is brought offline with this command, the data files associated with that tablespace are backed up as OS files or devices. The backup can be accomplished using an OS function or using a third-party utility you may have purchased. The control files are backed up in a slightly different manner. To back up the control file, you use the Oracle command ALTER DATABASE BACKUP CONTROLFILE TO 'filename' REUSE. This command copies the current control file to the file specified by filename. It is important that the control file be backed up any time the layout of the database changes. The characteristic of this kind of backup is that each data file is read sequentially. Unless some other OS function accesses the disks, you get purely sequential I/O. To take advantage of the sequential nature of the database backup, you should isolate the sequential I/Os by avoiding any other I/Os to that disk volume. Compared to an cold backup, it is much more difficult to guarantee that no other I/Os are being done to the disk volumes during a hot backup because the database is still up and running. Because several tablespaces may use the same volume, you should serialize the backup of those data files. Data Access Patterns During BackupWith both the hot and cold backups, there is purely sequential access to the data files by the backup process. By isolating the sequential disk access, much higher I/O rates can be accomplished than when accessing a disk volume in a random fashion. Because you want to do backups as quickly as possible, the highest I/O throughput is desired. Therefore, you should try to get as much sequential access as possible. During a cold backup, you can control how the data is accessed on the disks by carefully designing the backup process. By serializing the backups so that there is one sequential data access per disk volume at a time, you can achieve very good backup speeds. The preceding statement assumes that the media to which you backing up can handle the load. During a hot backup, you dont have as much control over how the data is accessed except through the design of the system. Because other tablespaces are active during the backup, if any of them have data files on the same disk volume as the one you are backing up, accesses to that disk volume will be of a random nature. If you can configure your system so that there is only one tablespace per disk volume, you can maintain the sequential data patterns of the backup process. System Load During BackupDuring the backup process, the load on the system is caused primarily by I/Osunless you are using compression for the backup. If you are compressing the data, there is significant CPU usage. In fact, if you do a hot backup and you do not have sufficiently fast processors, you may be CPU bound during the backup and the backup may take even longer to perform. Because the time it takes to perform the backup depends primarily on how fast you can read the data from the data files, any external factors such as compression speed or network throughput should be minimized if you are to run the backup at its full potential. Later in this chapter, you learn about some techniques you can use to overcome some of these difficulties. Backup GoalsThe goal of the backup system is to back up the data files as quickly as possible. For a hot backup, it is important to get the data files back online as soon as possible. The backup operation should be an I/O-bound task. If the performance of the system is limited by the speed of your CPUs or by the throughput of your network, take steps to minimize these bottlenecks. Although speed is important, it is equally important for the backup to run completely without errors. Do not sacrifice completeness for speed. A fast backup that is missing files or has data corruption is useless. By minimizing factors such as compression speed and network throughput, you can maximize the performance of the backup. The highest backup speed possible is the speed at which the data files are read in a purely sequential fashion. Of course, system overhead prevents you from reaching the theoretical maximum, but by minimizing this overhead and maximizing throughput, you should be able to approach this speed. Both the hot and cold backup operations involve reading the data files and writing the data to the backup medium. The actual copying of the data itself is done using OS or third-party utilities. Oracle allows you to back up the system in the most optimal manner for your system. The data is accessed in a purely sequential manner. If you isolate the I/Os either by serializing the data file backups (for cold backups) or by carefully partitioning data (for hot backups), you can achieve maximum performance. The following section looks at some of the system designs that can help you achieve maximum backup performance.
|
![]() |
Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. |